<?php
namespace app\api\controller;

use app\common\model as M;

/**
 * 直播模块
 */
class Living extends \app\api\ApiBase
{
    public $model = '\app\common\model\LivingReplay';

    /**
     * 回放列表
     * @Author   FW
     * @DateTime 2024-03-26
     * @Email    123763712@qq.com
     * @return   [type]           [description]
     */
    public function replays()
    {
        $filter = input();
        $list  = $this->model::getList($filter);

        return $this->returnSuccess($list['data']);
    }

    /**
     * 增加播放次数
     * @Author   FW
     * @DateTime 2024-03-26
     * @Email    123763712@qq.com
     * @return   [type]           [description]
     */
    public function replaysPlusPlays()
    {
        $replayId = input('replay_id');
        $this->model::where('id',$replayId)->setInc('plays',1);
        return $this->returnSuccess();
    }

}//Class End